﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace MethodWorx.Core.DomainModel
{

    /// <summary>
    /// Base class for any entities that are aggregate roots.  An aggregate root is the root object
    /// that contains other entities or value objects that make up the aggregate
    /// 
    /// RULES:
    ///    http://richarddingwall.name/2009/10/13/life-inside-an-aggregate-root-part-1/
    ///    
    ///    1. Entities can only hold references to aggregate roots, not entities or value objects within
    ///    2. Access to any entity or value object is only allowed via the root
    ///    3. The entire aggregate is locked, versioned and persisted together
    ///    
    /// </summary>
    /// 
    [Serializable]
    public abstract class AggregateRoot : Entity
    {
        public virtual IEnumerable GetValidationErrors()
        {
            return null;
        }
    }
}
